/*
 *  Copyright (c) 2010-2023
 */
package net.siufung.market.base.uuid.mapper.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import lombok.Data;

/**
 * 流水号配置表 数据实体
 * @author 陈建峰
 * @since 2023-10-09 22:16:17
 * @version 1.0.0
 */
@Data
@TableName("sys_uuid_rules")
public class SysUuidRules implements Serializable {

    private static final long serialVersionUID = 1711385139373821952L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    /**
     * 流水号id
     */
    @TableField("uuid_id")
    @NotNull(message = "流水号id不能为空!")
    private Integer uuidId;


    /**
     * 规则类型
     */
    @TableField("uuid_part_type")
    @Length(max=1, message="规则类型长度不大于1!")
    private String uuidPartType;


    /**
     * 规则配置值
     */
    @TableField("uuid_part_value")
    @Length(max=255, message="规则配置值长度不大于255!")
    private String uuidPartValue;


    /**
     * 排序
     */
    @TableField("sequence")
    @NotNull(message = "排序不能为空!")
    private Integer sequence;


    /**
     * 描述
     */
    @TableField("description")
    @Length(max=255, message="描述长度不大于255!")
    private String description;


    /**
     * 租户
     */
    @TableField("tenant_id")
    private Integer tenantId;


    /**
     * 创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    @Length(max=32, message="创建人长度不大于32!")
    private String createdBy;


    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

}


